filechooserbutton: Simplify the code to preserve the selection while the dialog is...
authorFederico Mena Quintero <federico@gnome.org>
Tue, 12 Feb 2013 01:33:17 +0000 (19:33 -0600)
committerFederico Mena Quintero <federico@gnome.org>
Thu, 14 Feb 2013 00:01:39 +0000 (18:01 -0600)
commitcef1465e88a3d87e1dd157099217db710a8f017b
tree2f131a48b0e45ddd4310bf1df33705a522b764de
parent7df00df6b6bf7d97883b3dc3870e4a8ddf086bf2
filechooserbutton: Simplify the code to preserve the selection while the dialog is running

It used to fetch a possibly multiple selection from the GtkFileChooserDialog, and then
pick just the first item from the selection list.  But since GtkFileChooserButton
operates in single-selection mode only, it can simply use gtk_file_chooser_get_file()
instead.

Also, the right way to reset the selection for GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER
is with gtk_file_chooser_select_file(), not with _set_current_folder_file().

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
gtk/gtkfilechooserbutton.c